<!--{template user/header}-->
<div class="container">
  <div class="nav-action">
		<!--{template user/left_side}-->
  </div>
  <!-- nav-action end -->
  <div class="content-panel">
      <div class="tab">
        <a href="{$strUsersUrl}&op=caselist" >案例管理</a>
		<a href="{$strUsersUrl}&op=caseadd"  class="selected"  >案例添加</a>

      </div>
      <div class="tab_detail">
      		<!-- 店铺设置 start -->
          <form role="form" action="{$strUrl}" method="post" class="form-horizontal" name="editCaseForm" id="editCaseForm">
          	<input type="hidden" name="formhash" id="formhash" value="{FORMHASH}">
			<input type="hidden" name="objId"  value="{$objId}">
            <div class="form-group">
              <label class="col-sm-2 control-label" for="case_name">案例名称：</label>
                <div class="col-sm-8 row">
                  <input type="text"  name="case_name" id="case_name"  class="form-control" value="{$caseInfo['case_name']}">
                </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label" for="case_url">案例链接：</label>
                 <div class="col-sm-8 row">
                  <input type="text"  name="case_url" id="case_url"  class="form-control" value="{$caseInfo['case_url']}" placeholder="http://">
                </div>
            </div>
			<div class="form-group">
              <label class="col-sm-2 control-label" for="case_pic">案例图片：</label>
                <div class="col-sm-8 row">
					  <div id="picker">上传图片</div>
					  <input type="hidden"  name="fileid" id="fileid"  class="form-control">
                  	 <input type="hidden"  name="case_pic" id="filepath"  class="form-control" value="{$caseInfo['case_pic']}">
					 <img id="case_img" src="{$caseInfo['case_pic']}" {if !$caseInfo['case_pic']}style="display:none"{/if} width="100px;" height="100px;">

                </div>
            </div>
			<div class="form-group ">
					<div class="col-sm-offset-2 col-sm-6">
						<ul class="affix-list upload-file-list-info" id="fileList">
							
						</ul>
					</div>
				</div>
<!--
			  <div class="form-group">
              <label class="col-sm-2 control-label" for="case_desc">案例描述：</label>
              <div class="col-sm-8 row">
                 <textarea id="case_desc" name="case_desc" rows="5"   class="form-control"> {$caseInfo['case_desc']}</textarea>
              </div>
            </div>
  -->
            <div class="form-group">
              <div class="col-sm-offset-2 col-sm-10">
                <button class="btn btn-default" type="submit" value="1" >保存</button>
                <span class="text-success" id="tipsUser"></span>
              </div>
            </div>
          </form>
      		<!-- 基本资料 end -->
      </div>
  </div>
  </div>
<script src="static/js/model/user/shop.js"></script>
<link rel="stylesheet" type="text/css" href="static/js/webuploader/webuploader.css">
<script type="text/javascript" src="static/js/webuploader/webuploader.js?r={RANDOM_PARA}"></script>
<script type="text/javascript" src="static/js/webuploader/kppw.webuploader.js"></script>
<script >
$(function(){
	$("#picker").KKUploader({
		accept: {
			extensions : 'jpg,gif,png,jpeg'
		},
		uploadEvents: {
			uploadComplete:function(file){
				var url = $("#"+file.id).find('.webuploader-pick-file-close').attr('data-fileurl');
				$('#case_img').show();
				$("#filepath").val(url);
				$('#case_img').prop('src',url);
				 $('.webuploader-pick-file-close').on('click','.close',function(){
					 $("#case_img").hide();
					 $("#filepath").val("");
					});
			}
		},
		fileNumLimit:1,
		hiddenName: 'fileid',
		fileSingleSizeLimit:"{$basic_config['max_size']}MB"
	},{
		objType:'task',
		filename:'file'
	});
	
});


</script>
<!--{template user/footer}-->